<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test27</title>
</head>
<body>
    <script type="text/javascript">
        run();
        function run() {
            var a = prompt("请输入一个年份");
            if (a%4==0 && a%100!=0 || a%400==0){
                alert(a+"是闰年");
            }else {
                alert(a+"不是闰年");
            }
        }
    </script>
</body>
</html>